<?php
namespace  app\admin\model;
use think\Model;


class User extends Model{
    public function email_exists($email, $id = 0) {
        $where = "email='" . $email . "' AND id<>'" . $id . "'";
        $result = User::where($where)->count('id');
        if ($result) {
            return true;
        } else {
            return false;
        }
    }

}